package com.sbx.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sbx.entity.dto.LoginUser;
import com.sbx.entity.dto.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface UserService {

    List<User> userList();

    User insert(User user);

    int deleteById(Integer id);

    User getUserById(String id);

    int update(User user);


    Page<User> getUserPage(User user, Integer pageIndex, Integer pageSize);


    void registerByEmail(User user);

    String confirmEmail(String email, String code);


    User userLogin(LoginUser loginUser, HttpServletResponse response);

    User tokenByUserInfo(String token);

    void userLogout(String token);

    User getUserBySessionTokenId(String token);
}
